package com.hcy.rabbitmanagerapi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

/**
 * @Author huchenying
 * @Description
 * @Date 2022/4/21 20:40
 */
@SpringBootApplication(scanBasePackages = "com.hcy")
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.hcy")
@EnableAspectJAutoProxy
public class ManagerApiApplication {
    public static void main(String[] args) {
        SpringApplication.run(ManagerApiApplication.class, args);
    }
    // 设置时区，防止new Date 时区不对
    @PostConstruct
    void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
    }
}
